package com.dfbz.demo01;

import java.util.LinkedList;
import java.util.Queue;

/**
 * @author lscl
 * @version 1.0
 * @intro:
 */
public class Demo01_Queue集合 {
    public static void main(String[] args) {

        Queue<String> queue = new LinkedList();
//        queue.add("滕王阁");
//        queue.add("岳阳楼");
//        queue.add("黄鹤楼");
//        queue.add("鹳雀楼");

        queue.offer("滕王阁");
        queue.offer("岳阳楼");
        queue.offer("黄鹤楼");
        queue.offer("鹳雀楼");

        String ele = queue.poll();
        System.out.println(ele);

        System.out.println(queue);
        System.out.println("----------------");

        String peek = queue.peek();
        System.out.println(peek);
        System.out.println(queue);


    }
}
